The present invention relates to the management of resources available to a computing system through the preemption of jobs when another (preempting) job is to be scheduled.
Increased reliance of businesses on computers has led to the development of better and more complex computing systems. Computing systems used by different businesses can be simple, including one or a few computers, or complex, involving a complex network of computers in processing communication with one another. In certain instances, several businesses may even share network environments. Available resources even when remotely located, may need to be shared among such businesses. In either case, some resources need to be shared at any one time. In large environments, the demands on these shared resources can be much greater than the available resources at any one time. In such circumstances, it becomes increasingly important to prioritize the availability of resources. When resources are prioritized and used efficiently, latency and processing time are reduced for all users of a computing system.
To manage resources efficiently, processing tasks are handled according to priority. High priority jobs are performed ahead of other jobs. Sometimes, jobs that are executing or are about to be executed are preempted to free up resources for higher priority jobs. A non-trivial problem is to efficiently determine which of the low priority running jobs are the best candidates to be preempted. Such jobs must be capable of being preempted, such that the resources freed up by those low priority jobs match the requirements of the high priority ones in terms of processing time and resource availability. The number and identity of jobs to be preempted must be determined accurately to avoid freeing up of resources which will be unused by the preempting high priority job. This avoids adversely affecting overall processing time and availability of resources or the network as a whole to one or more users or businesses.
Heretofore, a satisfactory solution for efficiently determining a set of jobs to be preempted did not exist. Prior art approaches produce undesirable side effects. For example, one prior art approach is to perform an exhaustive search over all possible preempt sets (i.e. sets of jobs which could be preempted). Even though an optimal set of lower priority jobs is preempted by this method, the method takes an unacceptably long time to be performed. Such method suffers from processing times which grow exponentially with the number of jobs under consideration.
Another approach is to assign weights to the jobs and then sort the jobs according to the weights. A big drawback to this approach is that it is heuristical and deterministic. Instances of pathological problems exist in which the algorithm always computes a bad solution. An example of this would be preempting most of the jobs, even if preempting one or two of the jobs would be sufficient. Preempting more jobs than necessary can affect overall performance and resource availability in the following ways. Unnecessarily preempted jobs are delayed and take longer to complete. The process itself of preempting jobs takes time to save the state of the preempted jobs prior to executing the higher priority jobs. In addition, time is needed to reschedule unnecessarily preempted jobs when the computing system becomes available again to run those jobs.
Consequently, as computing systems become more complex and encompass more shared resources and users, improved techniques are needed for determining which jobs should be preempted when higher priority jobs are submitted for execution.